<?php
/* @var $this NewsController */
/* @var $model News */

$this->breadcrumbs = array(
    'News' => array('index'),
    'Manage',
);

$this->menu = array(
    array('label' => 'Create News', 'url' => array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#news-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>


<?php //echo CHtml::link('Advanced Search', '#', array('class' => 'search-button')); ?>
<div class="search-form" style="display:none">
    <?php
    $this->renderPartial('_search', array(
        'model' => $model,
    ));
    ?>
</div><!-- search-form -->

<div class="row-fluid">
    <div class="span12 box bordered-box orange-border" style="margin-bottom:0;">
        <div class="box-header blue-background">
            <div class="title">Manage News</div>
            <div class="actions">
                <a href="#" class="btn box-collapse btn-mini btn-link"><i></i>
                </a>
            </div>
        </div>
        <div class="box-content box-no-padding">
            <div class="responsive-table">
                <div class="scrollable-area">
                    <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper form-inline" role="grid">
                        
                        <?php
                        $this->widget('zii.widgets.grid.CGridView', array(
                            'id' => 'news-grid',
                            'dataProvider' => $model->search(),
                            'filter' => $model,
                            'columns' => array(
//                                'id',
                                'name',
                                'description',
//                                'content',
//                                'created_at',
//                                'updated_at',
                                array(
                                    'class' => 'CButtonColumn',
                                ),
                            ),
                        ));
                        ?>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



